package com.sfc.sdsr.server.dao;

public class DaoFactory {
	
	private static Dao dao;
	
	public static Dao getDao() {
		return dao;
	}
	
	public static void setDao(String daoRequest) {
		if (daoRequest.equalsIgnoreCase("file")) {
			dao = FileDao.getInstance();
		} else if (daoRequest.equalsIgnoreCase("sql")) {
			dao = SqlDao.getInstance();
		} else {
			dao = BrokenDao.getInstance("Unknown dao request: " + daoRequest);
		}
	}
}
